/*----------------------------------------------------------------------------------------
*
*  Copyright 2019, Gao Hai Hui, <fromzeropoint@126.com>.  All rights reserved.
*  https://gitee.com/helloworldghh/xoskit.git
*  Use of this source code is governed by a MIT license
*  that can be found in the License file.
*
----------------------------------------------------------------------------------------*/
#ifndef __IMPL_MGR_H__
#define __IMPL_MGR_H__

namespace xos_encrypt
{

    class mgr : public i_encrypt_mgr
    {
    public:
        typedef xos::release_impl< mgr > T;

    public:
        static int static_init( xos_container::i_container * pContainer, i_encrypt_mgr ** ppv );
        static xos_container::i_container * container();
        static xos_box::i_str_property * ssl_ctx_prop();
        static mgr * get();

    public:
        mgr();
        ~mgr();

    public:
        // 初始化及创建对象
        int set_ssl_ctx_prop( xos_box::i_str_property * pProp );
        i_ssl_mgr* ssl();
        i_rsa_mgr* rsa();
        i_des* des();

    protected:
        int put_back_to_pool();
        int init_data();

    public:
        int init();
        int term();

    };

} // xos_encrypt

#endif // __IMPL_MGR_H__
